Chapter 3
1.
n=1000
for i in range(n):
    print('We like Python’s turtles! ')
3.
for i in ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']:
    print('One of the months of the year is',i)
 
5.
xs = [12, 10, 32, 3, 66, 17, 42, 99, 20]
for i in range(9):
    print(xs[i],end=' ')
for i in range(9):
    print(xs[i]**2,end=' ')
total = 0
for i in range(0, 9):
    total = total + xs[i]
    print(total, end=' ')
for i in range(0,9):
    product = product * xs[i]
print(product)
 
6.
n=3
import turtle
wn=turtle.Screen
for i in range(n):
    turtle.forward(100)
    turtle.left(360/n)
wn.mainloop()
7,8
import turtle
wn=turtle.Screen
for i in[160, -43, 270, -97, -43, 200, -940, 17, -86]:
    alex.left(i)
    alex.forward(60)
wn.mainloop()
11.
import turtle
wn=turtle.Screen
turtle.hideturtle()
for i in range (5):
    turtle.forward(100)
    turtle.right(180-36)
wn.mainloop()
12.
import turtle
wn=turtle.Screen
turtle.shape('turtle')
turtle.stamp()
for i in range(12):
    turtle.penup()
    turtle.forward(50)
    turtle.pendown()
    turtle.forward(5)
    turtle.penup()
    turtle.forward(15)
    turtle.stamp()
    turtle.goto(0,0)
    turtle.right(30)
wn.mainloop()
13.
import turtle
a=turtle.Turtle()
print(type(a))